package com.me.obj {

	/**
	 *
	 * @author yw
	 *
	 * @Date 2011-9-19 上午11:51:07
	 */
	public class Building {
		public static const TYPE_BUILDING:String = "BUILDING";

		public static const TYPE_NPC:String = "NPC";
		
		public static const TYPE_PORTAL:String = "PORTAL";

		public static const LAYER_SURFACE:String = "LAYER_SURFACE";

		public static const LAYER_BUILDING:String = "LAYER_BUILDING";

		private var _id:String = "0";

		private var _layer:String;

		private var _btype:String;

		private var _img:String;

		private var _x:int;

		private var _y:int;

		public function Building(bt:String, image:String, layer:String) {
			_btype = bt;
			_img = image;
			_layer = layer;
		}

		public function get btype():String {
			return _btype;
		}

		public function set btype(value:String):void {
			_btype = value;
		}

		public function get img():String {
			return _img;
		}

		public function set img(value:String):void {
			_img = value;
		}

		public function get desc():String {
			return _img + ":" + (_btype == TYPE_BUILDING ? "建筑" : "NPC") + ":" + (layer == LAYER_SURFACE ? "地表层" : "建筑层") + "(坐标=" + x + " : " + y + ",ID:" + id + ")";
		}

		public function get x():int {
			return _x;
		}

		public function set x(value:int):void {
			_x = value;
		}

		public function get y():int {
			return _y;
		}

		public function set y(value:int):void {
			_y = value;
		}

		public function get layer():String {
			return _layer;
		}

		public function set layer(value:String):void {
			_layer = value;
		}

		public function get id():String {
			return _id;
		}

		public function set id(value:String):void {
			_id = value;
		}


	}
}